export default {
  path: '/product',
  component: () => import(/* webpackChunkName: 'product' */ '@/views/product'),
  redirect: '/product/list',
  children: [
    {
      // 新模式商品
      path: 'new-product',
      component: resolve => require(['@/views/product/new-product'], resolve),
      meta: { title: '商品列表' }
    },
    {
      path: 'list',
      component: resolve => require(['@/views/product/list'], resolve),
      meta: { title: '商品列表' }
    },
    {
      // product_id / group_id
      path: 'detail/:id/:group?',
      component: resolve => require(['@/views/product/detail'], resolve),
      meta: { title: '商品详情' }
    },
    // brand
    {
      path: 'brand-list',
      component: resolve => require(['@/views/product/brand/list'], resolve),
      meta: { title: '品牌列表' }
    },
    {
      path: 'brand-view/:id',
      component: resolve => require(['@/views/product/brand/view'], resolve),
      meta: { title: '品牌商品' }
    },
    // area
    {
      path: 'area/:id',
      component: resolve => require(['@/views/product/area'], resolve)
    },
    // category
    {
      path: 'category/:id?',
      component: resolve => require(['@/views/product/category'], resolve)
    },
    {
      path: 'category-by-parent/:id',
      component: resolve => require(['@/views/product/category/second'], resolve)
    },
    {
      path: 'category-product-list/:id',
      component: resolve => require(['@/views/product/category/product'], resolve)
    },
  ]
}
